#ifndef __SALCFG_H__
#define __SALCFG_H__

#ifndef __NO_RETURN
#if   defined(__CC_ARM)
#define __NO_RETURN __declspec(noreturn)
#elif defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)
#define __NO_RETURN __attribute__((__noreturn__))
#elif defined(__GNUC__)
#define __NO_RETURN __attribute__((__noreturn__))
#elif defined(__ICCARM__)
#define __NO_RETURN __noreturn
#else
#define __NO_RETURN
#endif
#endif

#define _SAL_LINUX_ 1

enum _sal_module_id
{
    OS_TIME = 2001,
    OS_LOG,
    OS_CLI,
    OS_CFG,
    OS_MEM,
    OS_TMR,
    OS_FS,
    OS_THREAD,
    OS_ASYNC,
    OS_SOCK,
    MOD_SAL_MAX,
};

// OS
#define SAL_PRODUCER _SAL_LINUX_

// LOG
#define SAL_LOG                 _ENABLE
#define LOG_ONELINE_MAX_LEN     512     // 一条日志的最大长度
#define LOG_RING_QUEUE_SIZE     64      // 缓存的日志数量
#define LOG_HEX_ONELINE_SIZE    32      // 16进制输出一行多少字节

// OSTIME
#define SAL_TIME                _ENABLE

// OSTIMER
#define SAL_OSTMR               _ENABLE

// CLI
#define SAL_CLI                 _ENABLE
#define CLI_CMD_NAME_MAX_LEN    32
#define CLI_CMD_HELP_MAX_LEN    32
#define _TTY_UART_              1
#define _TTY_SOCK_              2
#define SAL_TTY_PRODUCER        _TTY_SOCK_

// SOCKET
#define SAL_SOCK                _ENABLE
#define _SOCK_LINUX_            1
#define _SOCK_LWIP_             2
#define SAL_SOCK_PRODUCER       _SOCK_LINUX_

// FS
#define SAL_FS                  _ENABLE
#define _FS_LINUX_              1
#define _FS_FAT32_              2
#define SAL_FS_PRODUCER         _FS_LINUX_

// CONFIGURATION
#define SAL_CFG_INI             _ENABLE      // 以INI文件格式存储
#define SAL_CFG_BIN             _DISABLE     // 以二进制格式存储

#endif  // __SALCFG_H__

